import React, { Component } from 'react';
import Top from "../../components/Top"
import { connect } from "react-redux"
class Mine extends Component {
    gofavlist() {
        this.props.history.push({ pathname: "/collection" })
    }
    render() {
        return (
            <div className='mine'>
                {/* 头部 */}
                <Top>个人中心</Top>
                <div className="header">
                    <img src="https://pic.zsucai.com/files/2021/0404/ffpic1120mltyb03458.jpg" alt="" />
                    <div className="name"> 旺财 </div>
                </div>
                <div className="main">
                    <div className="main-top">
                        <div className="shouchang" onClick={() => { this.gofavlist() }}><div className='num'>{this.props.collect.length}</div><div className='blod'>收藏</div></div>
                        <div className="jifen"><div className='num'>1</div><div className='blod'>积分</div></div>
                        <div className="youhui"><div className='num'>1</div><div className='blod'>优惠券</div></div>
                    </div>
                    <div className="main-dingdan">
                        <div className="titel">
                            <h4>我的订单</h4>
                            <span>查看全部订单</span>
                        </div>
                        <div className="btn">
                            <span>待付款</span>
                            <span>待发货</span>
                            <span>已发货</span>
                            <span>待评价</span>
                        </div>
                    </div>
                    <div className="huiyuan">会员中心</div>
                    <div className="main-bottom">
                        <div>领券中心</div>
                        <div>我的评价</div>
                        <div>收货地址</div>
                        <div>我的客服</div>
                    </div>
                </div>
            </div>
        );
    }
}

export default connect(
    (state) => {
        return {
            "collect": state.collection
        }
    },
    (dispatch) => {
        return {

        }
    }

)(Mine);